-
Notifications
You must be signed in to change notification settings - Fork 30
[MSSQL] Alpha: Support replication from SQL Server / Azure SQL Database #415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
More module templating
More module template files added
# Conflicts: # pnpm-lock.yaml
Cleaned up some more unused imports
Cleaned up dead code
Added type mapping tests
rkistner
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still need to review the replication implementation, but here are some initial comments.
rkistner
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall architecture looks good. My main comments here are around SQL injection possibilities, primarily with the table and schema names.
Export and use SQLite helper type bit
# Conflicts: # service/src/entry.ts
Introduce SQL Server / Azure SQL Database as a replication datasource
This change set enables PowerSync to listen for changes on SQL Server Databases that have Change Data Capture (CDC) enabled.
This is achieved by polling the CDC tables for updates on a regular interval and writing the changes to the bucket storage. For more details on how CDC works please see documentation:
CDC for SQL Server
CDC for Azure SQL Database
Requirements:
_powersync_checkpointstable to allow PowerSync to generate regular updates. Table should be CDC enabled.cdc_readerrole which grants access to CDC tables and functionsVIEW SERVER PERFORMANCE STATE(SQL Server only)VIEW DATABASE PERFORMANCE STATE(SQL Server and Azure SQL)See init.sql for examples.
Self Hosted Demo available here:
[MSSQL] Created self host demo self-host-demo#57